package com.client.koshercook.server;

/**a class holding administrator settings and debug options*/
public class Debug {

	//current last recipe in sites:
	//rotev = 977
	//kipa 1881
	//shtybel 484
	//chef lavan 5389?
	
	/**regular run, what needed for apps engine*/
	public static final short RUN = 0; 
	
	/**1 time to fill datastore with ingredients.
	add 1 ingredient in site and when it finish to update, close!*/
	public static final short RESTART = 1; 
	
	/**clean all recipes from DS, then scan recipes to fill it.
	add 1 ingredient in site and when it finish to update, close! */
	public static final short SCAN_REC = 2;
	
	/**scan more recipes to fill datastore.
	add 1 ingredient in site and when it finish to update, close! */
	public static final short SCAN_MORE_REC = 3;
	
	/**meir should debug a bug I found..*/
	public static final short MEIR = 4;
	
	
	
	/**here you decide how to run. change DO value.*/
	public static final short DO = 0;
	
	/*LOGIN_LINK options:
	"http://127.0.0.1:8888/Client.html?gwt.codesvr=127.0.0.1:9997"
	"http://matkonkasher.appspot.com"
	*/
	public static final String LOGIN_LINK = "http://127.0.0.1:8888/Client.html?gwt.codesvr=127.0.0.1:9997";
	
	public static final short MAXSCANS = 2; //max successful scans. reccomend 2-3.
	public static final short TRIES = 4; //max invalid recipes scans. reccomend 3-6.
	public static final short SCANSITE = 2; // 1 for Kipa, 2 for Chef Lavan, 3 for rotev, 4 stybel

	public static final boolean ADVANCE_SCAN = true; //should keep scanning sites even if failed previously
	
	/**
	 * contains a list of banned recipes.
	 * @return true if the recipe is banned
	 */
	public static boolean isBannedRecipe(String link) {
		return (link.equals("http://www.chef-lavan.co.il/tabid/53/RecipeID/20/Default.aspx")||
				link.equals("http://www.rotev.co.il/last_video.aspx?recipe_id=215")||
				link.equals("http://www.kipa.co.il/food/matkon/291")||
				link.equals("http://www.kipa.co.il/food/matkon/550"));
	}
}
